# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libsrtp
pkgver=2.5.0
pkgrel=1
pkgdesc="implementation of the Secure Real-time Transport Protocol (SRTP)"
url="https://github.com/cisco/libsrtp"
arch="all"
license="BSD-3-Clause"
makedepends="doxygen libpcap-dev meson openssl-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/cisco/libsrtp/archive/v$pkgver.tar.gz"

case "$CARCH" in
	s390x) options="$options !check" ;;
esac

build() {
	abuild-meson \
		-Dcrypto-library=openssl \
		builddir .
	meson compile -C builddir
}

check() {
	meson test --no-rebuild --print-errorlogs -C builddir
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C builddir
}

sha512sums="
bd679ab65ccf22ca30fe867b9649a0b84cfa6fad6e22eb10f081141632f6dd56479a04d525b865f11fd46007303ca211065d9c170e4820d6ea7055403702340a  libsrtp-2.5.0.tar.gz
"
